package com.ashin.job;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;

/**
 * @author Ashin
 */
public class MyJob implements SimpleJob {

    @Override
    public void execute(ShardingContext context) {
        System.out.println(context);
        switch (context.getShardingItem()) {

            case 0:
                System.out.println("0..");
                break;
            case 1:
                System.out.println("1..");
                break;
            case 2:
                System.out.println("2..");
                break;
            default:
                System.out.println("default..");
        }
    }
}

